Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #19812 to 7.8: [Bug] fix bug with empty filter values returning no results in system/service #19914

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Jul 14, 2020

Cherry-pick of PR #19812 to 7.8 branch. Original message:

What does this PR do?

This fixes a bug where if the system/service module is running on an OS with an older version of systemd, and a user hasn't configured pattern_filter, the metricset will return no results. When using the systemd ListUnitsFiltered API call, we don't bypass the pattern_filter in cases where the filter is empty.

Why is it important?

It's a bug, the metricset won't return any data.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • Build and Run on CentOS 7, which uses a sufficiently old version of systemd.
  • Enable the system/service metricset
  • make sure service.pattern_filter isn't configured.
  • Make sure we get data.

…/service (elastic#19812)

* fix bug with empty filter values returning no results

* add changelog entry

(cherry picked from commit a1dd2ec)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2020
@botelastic
Copy link

botelastic bot commented Jul 14, 2020

This pull request doesn't have a Team:<team> label.

@fearful-symmetry fearful-symmetry requested a review from a team July 14, 2020 18:15
@fearful-symmetry fearful-symmetry merged commit 9badfc9 into elastic:7.8 Jul 14, 2020
@zube zube bot removed the [zube]: Done label Oct 13, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…/service (elastic#19812) (elastic#19914)

* fix bug with empty filter values returning no results

* add changelog entry

(cherry picked from commit 1e531b1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants